package com.zeei.ems.meet.model.cnst;

import com.zeei.ems.base.util.StringUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

public class WaterLevelConstant {
    /** 下发类型 */
    @Getter
    @AllArgsConstructor
    public enum WaterLevel {

        ONE(1, "Ⅰ类"),
        TWO(2, "Ⅱ类"),
        THREE(3, "Ⅲ类"),
        FOUR(4, "Ⅳ类"),
        FIVE(5, "Ⅴ类"),
        SIX(6, "劣Ⅴ类");

        private final Integer value;
        private final String name;

        public String getName(Integer level) {
            if (null == level) {
                return null;
            }

            for (WaterLevel waterLevel : values()) {
                if (waterLevel.value.equals(level)) {
                    return waterLevel.name;
                }
            }

            return StringUtil.empty();
        }
    }
}
